<?php
namespace app\admin\controller;
/**
 * 账户设置
 * @author stone
 *
 */
class Sysuser extends Base{
    /**
     * 账户设置
     * @return \think\response\View
     */
    public function passedit(){
        
        $user = new \app\admin\model\User();
        $res=$user->getAccountInfo($this->jcuserId);
        $this->assign("user_name",$res["account"]);
        return view();
    }

    /**
     * 修改密码
     * @return \think\response\Json
     */
    public function passsave(){
        $password = I('post.pwd');
        if (!$password){
            return $this->param_error();
        }
        $user = new \app\admin\model\User();
        $user->passsave($this->jcuserId, $password);
        return $this->returnOk();
    }
    
}
